package com.android.porttallymansystem.ui.viewmodel

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class LoginViewModel : ViewModel() {

    private val phoneOrEmailLiveData = MutableLiveData<String>()
    private val passwordLiveData = MutableLiveData<String>()

    val phoneOrEmail: LiveData<String> get() = phoneOrEmailLiveData
    val password: LiveData<String> get() = passwordLiveData

    init {
        phoneOrEmailLiveData.value = ""
        passwordLiveData.value = ""
    }

    fun setPhoneOrEmail(phoneOrEmail: String) {
        phoneOrEmailLiveData.value = phoneOrEmail
    }

    fun setPassword(password: String) {
        passwordLiveData.value = password
    }
}